#!/usr/bin/python

# cmp函数在3.x已经没有了。
# 根据官方给出的解决方案自己定义一个吧

def cmp(a,b):
    ret = (a > b) - (a < b)
    return ret

tuple1, tuple2 = (123, 'xyz'), (456, 'abc')

print(cmp(tuple1, tuple2));
print(cmp(tuple2, tuple1));
tuple3 = tuple2 + (786,);
print(cmp(tuple2, tuple3))
